package cupk.abner;

import java.util.Hashtable;

public class IgoChessmanFactory {
    private static IgoChessmanFactory instance = new IgoChessmanFactory();
    private Hashtable ht = new Hashtable();
    private IgoChessmanFactory() {
        IgoChessman black, white;
        black = new BackIgoChessman();
        ht.put("b", black);
        white = new WhiteIgoChessman();
        ht.put("w", white);
    }
    public static IgoChessmanFactory getInstance() {
        return instance;
    }
    public IgoChessman getIgoChessman(String color){
        return (IgoChessman)ht.get(color);
    }
}